1. Field of the Disclosure
Aspects of the present invention generally relate to a facsimile system that packetizes and transmits coded image data, a facsimile apparatus and a communication method in the facsimile system, a method for controlling the facsimile apparatus, and a storage medium.
2. Description of the Related Art
In recent years, an internet protocol facsimile (IPFAX) apparatus, which performs FAX transmission/receiving using an IP network, has been paid attention to. The IPFAX is listed as one of contents in a public IP network (a next generation network (NGN) provided by NIPPON TELEGRAPH AND TELEPHONE CORPORATION (NTT), in Japan.
A conventional analog facsimile apparatus (analog FAX) can also be connected to the public IP network via International Telecommunication Union-Telecommunication (ITU-T) recommendation T.38 (herein below referred to as “T.38”) gateway (GW). Call connection and data communication between IPFAXs are respectively performed using a Session Initiation Protocol (SIP) and a T.38 protocol, although details thereof are omitted because the technique is known. As discussed in Japanese Patent Application Laid-Open No. 9-163119, a T.38 GW converts SIP call connection into analog telephone call connection and converts a T.38 protocol into an ITU-T recommendation T.30 (herein below referred to as “T.30”) protocol in real time, to enable mutual communication between an IPFAX and an analog FAX.
FAX communication includes error correction mode (ECM) communication in which error correction can be performed (error correction is performed) and non-ECM communication in which error correction cannot be performed (error correction is not performed).
“ECM communication” means dividing image data into blocks, dividing each of the blocks into some frames each including 256 bytes, and transmitting the frame to a partner. A receiving side determines an error every time it receives one frame, repeats the error determination until it has received one block, and requests, if an error frame has existed at the time point where it has received one block, a transmission side to retransmit the error frame. The transmission side has a function of retransmitting only the frame in which an error has occurred. In ECM communication, a flag for maintaining synchronization between the frames is usually sent out. Image data, which has been missing due to noise on a line, is retransmitted so that line missing does not occur.
However, the analog FAX includes one of a type incapable of ECM communication. In such a case, communication between the IPFAX and the analog FAX is performed in non-ECM. In non-ECM communication, when an error occurs during communication of an image signal, the error becomes an error for each line so that the line is missing. In non-ECM communication, an image compression system includes a modified Huffman (MH) coding system and a modified relative element address designate (MR) coding system. The MH coding system and the MR coding system are systems for coding for each line data, although detailed description thereof is omitted.
While the transmission side sequentially connects and transmits coded lines, a code called end of line (EOL) is added between the coded lines. The coded line is sandwiched between EOL codes, resulting in (EOL+line data+EOL). The last line of one page is coded, and a code called return to control (RTC) is added to the end of the last coded line. A sequence of six EOL codes forms a RTC code. Therefore, the last line becomes (EOL+DATA+RTC).
Consider a case where non-ECM data is transmitted from the IPFAX to the analog FAX, for example. A T.38 GW includes a buffer of a certain size in its inner part. Data transmitted from the IPFAX is temporarily stored in the buffer, and the data in the buffer is transmitted to the analog FAX connected to the T.38 GW in real time. The buffer in the T.38 GW is generally as small as several lines of FAX data, and the whole FAX data cannot be stored. The IPFAX and the T.38 GW are connected to each other via an IP network, and the T.38 GW and the analog FAX are connected to each other via an analog network. The T.38 GW and the analog FAX usually communicate with each other at a negotiated speed. The maximum speed is 14400 bps defined by ITU-T V.17, for example. The IPFAX and the T.38 GW are usually connected to each other via the IP network having a speed higher than 14400 bps. Therefore, when the IPFAX performs data transmission to the T.38 GW at a speed of 14400 bps or more, the buffer inside the T.38 GW overflows, and overruns.
To solve the above-described overrun, a transmission speed from the IPFAX to the T.38 GW is made equal to a transmission speed from the T.38 GW to the analog FAX. However, a packet may be delayed on the IP network. In such a case, data is not transmitted at a sufficient speed from the IPFAX to the T.38 GW. As a result, the T.38 GW may underrun. The T.38 GW has a function of transmitting data without any interruption from the T.38 GW to the analog FAX by adding “FILL” (i.e., data 0) to the non-ECM data which has been transmitted from the IPFAX, if such underrun occurs. In conventional communication between analog FAXs without via the T.38 GW, the analog FAX on the side of a transmission apparatus inserts FILL. The transmission apparatus adds FILL to the end of line data in the above-described line data (EOL+line data+EOL) so as not to cause underrun when the line is coded. Thus, line data (EOL+line data+FILL+EOL) is formed. While FILL is zero data, a plurality of pieces of FILL is inserted so that no underrun occurs. FILL needs to be inserted at the end of the line data and in front of EOL (or the end of the line data and in front of RTC). If Fill is inserted into other positions, coded data is destroyed, and cannot be decoded.
If the analog FAX has an ECM communication function, and ECM communication is selected in data transmission from the IPFAX to the analog FAX, there is no problem even if the above-described frame transmission is not on time.
The IPFAX packs one frame (256 Bytes) in one T.38 data packet, and transmits the T.38 data packet to the T.38 GW. In ECM communication, the T.38 GW inserts the above-described flag as an underrun measure between frames. Since the flag is inserted into a place where the flag has originally existed, so that data inside the frame is not destroyed. On the other hand, in non-ECM, framing is not performed, unlike in ECM communication. Thus, a place into which FILL can be inserted, as described above, is restricted.
In data transmission from the IPFAX to the IPFAX, non-ECM communication is hardly performed. Even if non-ECM communication is performed, communication at a speed obtained by a capability exchange (a digital identification signal (DIS) and a digital command signal (DCS)) of a conventional FAX is not performed, and communication is performed at a network speed. Therefore, no underrun and no overrun occur from the above-described reason.
Image communication from the IPFAX to the T.38 GW is performed using a T.38 data packet defined in T.38 recommendation, and data transmission to the IP network is performed using an IP packet. The maximum size of the IP packet is approximately 1500 Bytes. One IP packet cannot contain the whole data on one page of a FAX text. Therefore, text data on one page is divided, and the divided data is packed in an IP packet and is transmitted from the IPFAX to the T.38 GW. Conventionally, text data on one page is transmitted from the IPFAX to the T.38 GW after being divided into a determined fixed size. Each of lines in the text is compressed. Thus, sizes of the lines after the compression differ. Accordingly, if the text data is divided into the fixed size, FILL is inserted into the middle of one line of FAX data in non-ECM when a packet is delayed. More specifically, the line becomes (EOL+middle of line data+FILL+the middle to the end of line data+EOL). Thus, coded data is destroyed, and cannot be decoded.
As described above, FILL can be inserted without affecting decoding of the coded data only at the end of the line data and in front of EOL (or at the end of the line data and in front of RTC). If data is transmitted in non-ECM from the IPFAX to the T.38 GW, like in the conventional technique, one line of the data is separated in the middle. Consequently, the T.38 GW inserts FILL into the middle of the line of the data. Thus, coded data is destroyed, and is transmitted to the analog FAX. Therefore, the coded data cannot be decoded in the analog FAX so that image transmission is unsuccessfully performed.
While T.38, a T.38 GW, and non-ECM communication are described above as an example, similar issues occur even in a transmission control protocol, and a gateway and communication using the transmission control protocol.